package com.atguigu.gmall.order.client;

import com.atguigu.gmall.model.order.OrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

@FeignClient("service-order")
public interface OrderFeignClient {

    @GetMapping("/api/order/auth/trade")
    Map<String,Object> trade();

    @GetMapping("/api/order/auth/getOrderInfo/{orderId}")
     OrderInfo getOrderInfo(@PathVariable Long orderId);


    @PostMapping("/api/order/inner/seckill/submitOrder")
    Long submitOrder(@RequestBody OrderInfo orderInfo);

}
